Example 4: Multimedia
When loading multimedia with the Import tool it is necessary to use the virtual Multimedia field to specify the pathway to the multimedia file to be imported. This example builds on the last one by including multimedia in the import, as well as a table.
The fields loaded are:
Fields |
Back-end name |
---|---|
Title | Multitle
|
Description | MulDescription
|
Creator | MulCreator_tab
|
Multimedia | Multimedia
|
For display purposes only, the import data below is presented with column headings listed vertically rather than horizontally. The first row of any tab or comma delimited file must include the column names. The appropriate layout is:
|
|
|
An image of a house. |
A classic 1950's design. Needs some work around the edges and a coat of paint. |
John Smith
|
An image of a cow. | Unknown | |
A 1950's Car! |
The import data is:
Column Name (must appear as the first row of the import data file) |
Record 1 |
Record 2 |
Record 3 |
---|---|---|---|
Multitle
|
An image of a house. | An image of a cow. | A 1950's Car! |
MulDescription
|
A classic 1950's design.
Needs some work around the edges and a coat of paint. |
||
MulCreator_tab(1)
|
John Smith
|
Unknown | |
MulCreator_tab(2)
|
Bill Wilson
|
||
Multimedia
|
C:\Images\House Image.jpg
|
C:\Images\Cow in paddock.jpg
|
C:\Images\Car 1950.jpg
|
The XML for this example is:
<?xml version="1.0" encoding="UTF-8"?>
<table>
<!--First record-->
<tuple>
<atom name="MulTitle">An image of a house.</atom>
<table name="MulCreator_tab">
<tuple>
<atom>John Smith</atom>
</tuple>
<tuple>
<atom>Bill Wilson</atom>
</tuple>
</table>
<atom name="Multimedia">C:\Images\House Image.jpg</atom>
</tuple>
<!--Second record-->
<tuple>
<atom name="MulTitle">An image of a cow.</atom>
<table name="MulCreator_tab">
<tuple>
<atom>Unknown</atom>
</tuple>
</table>
<atom name="Multimedia">C:\Images\Cow in paddock.jpg</atom>
</tuple>
<!--Third record-->
<tuple>
<atom name="MulTitle">A 1950's Car!</atom>
<atom name="MulDescription">A classic 1950's design.
Needs some work around the edges and a coat of paint.</atom>
<atom name="Multimedia">C:\Images\Car 1950.jpg</atom>
</tuple>
</table>
Note:
The thoroughness of the Import process (compared to a simple batch load) is highlighted when loading multimedia. When importing a .jpg image, for example, much data is automatically generated by